package com.tanhan.mindapp.dao;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tanhan.mindapp.dao.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@TableName("sys_role")
@Schema(description = "系统角色实体类")
public class SysRole extends BaseEntity {
    public SysRole() {
        this.status = "0";
    }

    private static final long serialVersionUID = 1L;

    // 角色名
    @TableField("role_name")
    @Schema(description = "角色名", example = "管理员")
    private String roleName;

    // 角色代码
    @TableField("role_code")
    @Schema(description = "角色代码", example = "ROLE_ADMIN")
    private String roleCode;

    // 描述
    @TableField("description")
    @Schema(description = "角色描述", example = "系统管理员，拥有所有权限")
    private String description;

    // 角色状态（0正常 1停用）
    @TableField(value = "status", fill = FieldFill.INSERT)
    @Schema(description = "角色状态", example = "0", allowableValues = {"0", "1"}, defaultValue = "0")
    private String status;
}
